﻿using System;

namespace SPRepository
{
    public class BaseContentTypeDto : IContentTypeDto
    {
        private readonly string _contentTypeId;
        private readonly DateTimeFieldDto _created;
        private readonly UserFieldDto _createdBy;
        private readonly IntegerFieldDto _id;
        private readonly DateTimeFieldDto _modified;
        private readonly UserFieldDto _modifiedBy;

        public BaseContentTypeDto() { }

        public BaseContentTypeDto(string contentTypeId, IntegerFieldDto id, UserFieldDto createdBy, DateTimeFieldDto created,
                                  UserFieldDto modifiedBy,
                                  DateTimeFieldDto modified)
        {
            _contentTypeId = contentTypeId;
            _createdBy = createdBy;
            _created = created;
            _modifiedBy = modifiedBy;
            _modified = modified;
            _id = id;
        }

        public BaseContentTypeDto(BaseContentTypeDto dto)
        {
            _contentTypeId = dto.ContentTypeId;
            _createdBy = dto.CreatedBy;
            _created = dto.Created;
            _modifiedBy = dto.ModifiedBy;
            _modified = dto.Modified;
            _id = dto.Id;
        }

        public string ContentTypeId
        {
            get { return _contentTypeId; }
        }

        public DateTimeFieldDto Modified
        {
            get { return _modified; }
        }

        public UserFieldDto ModifiedBy
        {
            get { return _modifiedBy; }
        }

        public DateTimeFieldDto Created
        {
            get { return _created; }
        }

        public UserFieldDto CreatedBy
        {
            get { return _createdBy; }
        }

        public IntegerFieldDto Id
        {
            get { return _id; }
        }
    }
}